import React, { Component } from 'react';
import DescriptionList from '@/components/DescriptionList';
import moment from 'moment';

const { Description } = DescriptionList;
class ConsultPage extends Component {
  constructor(props) {
    super(props);
    this.state = {};
  }

  componentDidMount() {}

  render() {
    const { consultList } = this.props;
    return (
      <div>
        {consultList &&
          consultList.length &&
          consultList.map(item => (
            <div key={item.rcrdTime}>
              <DescriptionList style={{ marginBottom: 50, paddingLeft: '5%' }}>
                <Description term="咨询方式">{item.consultWayName}</Description>
                <Description term="咨询类型">{item.typeName}</Description>
                <Description term="咨询内容">{item.content}</Description>
                <Description term="咨询时间">
                  {item.rcrdTime ? moment(item.rcrdTime).format('YYYY-MM-DD HH:mm') : '--'}
                </Description>
                <Description term="回复状态">{item.stateName}</Description>
                <Description term="回复内容">{item.replyContent}</Description>
              </DescriptionList>
            </div>
          ))}
      </div>
    );
  }
}

export default ConsultPage;
